<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>echarts</title>
    <script type="text/javascript" src='/js/echarts.min.js'></script>
</head>
<body>
<div id="chart" style="width:1840px;height:840px;"></div>
</body>
<script type="text/javascript">
    // 初始化图表标签
    var myChart = echarts.init(document.getElementById('chart'));
    var options = {
        tooltip : {
            trigger: 'axis'
        },
        toolbox: {
            show : true,
            feature : {
                mark : {show: true},
                dataView : {show: true, readOnly: false},
                magicType: {show: true, type: ['line']},
                restore : {show: true},
                saveAsImage : {show: true}
            }
        },
        calculable : true,
        legend: {
            data:['持仓数量','价格']
        },
        xAxis : [
            {
                type : 'category',
                data : ['2018/6/16',
                    '2018/6/19',
                    '2018/6/20',
                    '2018/6/21',
                    '2018/6/22',
                    '2018/6/23',
                    '2018/6/24',
                    '2018/6/25',
                    '2018/6/26',
                    '2018/6/27',
                    '2018/6/28',
                    '2018/6/29',
                    '2018/6/30',
                    '2018/7/1',
                    '2018/7/2',
                    '2018/7/3',
                    '2018/7/4',
                    '2018/7/5',
                    '2018/7/6',
                    '2018/7/7',
                    '2018/7/8',
                    '2018/7/9',
                    '2018/7/10',
                    '2018/7/11',
                    '2018/7/12',
                    '2018/7/13',
                    '2018/7/14',
                    '2018/7/15',
                    '2018/7/16',
                    '2018/7/17',
                    '2018/7/18',
                    '2018/7/19',
                    '2018/7/20',
                    '2018/7/21',
                    '2018/7/22',
                    '2018/7/23',
                    '2018/7/24',
                    '2018/7/25',
                    '2018/7/26',
                    '2018/7/28',
                    '2018/7/29',
                    '2018/7/30',
                    '2018/7/31',
                    '2018/8/1',
                    '2018/8/2',
                    '2018/8/3',
                    '2018/8/4',
                    '2018/8/5',
                    '2018/8/6',
                    '2018/8/7',
                    '2018/8/8',
                    '2018/8/9',
                    '2018/8/10',
                    '2018/8/11',
                    '2018/8/12',
                    '2018/8/13',
                    '2018/8/14',
                    '2018/8/15',
                    '2018/8/16',
                    '2018/8/17',
                    '2018/8/18',
                    '2018/8/19',
                    '2018/8/20',
                    '2018/8/21',
                    '2018/8/22',
                    '2018/8/23',
                    '2018/8/24',
                    '2018/8/25',
                    '2018/8/26',
                    '2018/8/27',
                    '2018/8/28',
                    '2018/8/29',
                    '2018/8/30',
                    '2018/8/31',
                    '2018/9/1',
                    '2018/9/2',
                    '2018/9/3',
                    '2018/9/4',
                    '2018/9/5',
                    '2018/9/6',
                    '2018/9/7',
                    '2018/9/8',
                    '2018/9/9',
                    '2018/9/10',
                    '2018/9/11',
                    '2018/9/12',
                    '2018/9/13',
                    '2018/9/14',
                    '2018/9/15',
                    '2018/9/16',
                    '2018/9/17',
                    '2018/9/18',
                    '2018/9/19',
                    '2018/9/20',
                    '2018/9/22',
                    '2018/9/23',
                    '2018/9/24',
                    '2018/9/25',
                    '2018/9/26',
                    '2018/9/27',
                    '2018/9/28',
                    '2018/9/29',
                    '2018/9/30',
                    '2018/10/1',
                    '2018/10/2',
                    '2018/10/3',
                    '2018/10/4',
                    '2018/10/5',
                    '2018/10/6',
                    '2018/10/7',
                    '2018/10/8',
                    '2018/10/9',
                    '2018/10/10',
                    '2018/10/11',
                    '2018/10/12',
                    '2018/10/13',
                    '2018/10/14',
                    '2018/10/15',
                    '2018/10/16',
                    '2018/10/17',
                    '2018/10/18',
                    '2018/10/19',
                    '2018/10/20',
                    '2018/10/21',
                    '2018/10/22',
                    '2018/10/23',
                    '2018/10/24',
                    '2018/10/25',
                    '2018/10/26',
                    '2018/10/27',
                    '2018/10/28',
                    '2018/10/29',
                    '2018/10/30',
                    '2018/10/31',
                    '2018/11/1',
                    '2018/11/2',
                    '2018/11/3',
                    '2018/11/4',
                    '2018/11/5',
                    '2018/11/6',
                    '2018/11/7',
                    '2018/11/8'
                ]
            }
        ],
        yAxis : [
            {
                type : 'value',
                name : '价格',
                scale: true,
                axisLabel : {
                    formatter: '{value}'
                }
            },
            {
                type : 'value',
                name : '持仓',
                scale: true,
                axisLabel : {
                    formatter: '{value}',
                }
            }
        ],
        series : [

            {
                name:'价格',
                type:'line',
                data:[6437,
                    6684,
                    6592,
                    6750,
                    6651,
                    6044,
                    5840,
                    6152,
                    6224,
                    6070,
                    6137,
                    5886,
                    6231,
                    6431,
                    6332,
                    6612,
                    6458,
                    6581,
                    6540,
                    6589,
                    6769,
                    6705,
                    6658,
                    6292,
                    6352,
                    6233,
                    6248,
                    6235,
                    6355,
                    6718,
                    7326,
                    7285,
                    7400,
                    7248,
                    7438,
                    7514,
                    7722,
                    8336,
                    8285,
                    8190,
                    8187,
                    8116,
                    8135,
                    7589,
                    7643,
                    7351,
                    7469,
                    6944,
                    7057,
                    6948,
                    6615,
                    6291,
                    6548,
                    6100,
                    6250,
                    6330,
                    6016,
                    6186,
                    6272,
                    6363,
                    6542,
                    6340,
                    6487,
                    6308,
                    6805,
                    6420,
                    6505,
                    6763,
                    6721,
                    6607,
                    6924,
                    7058,
                    7045,
                    6957,
                    7047,
                    7164,
                    7269,
                    7282,
                    7376,
                    6440,
                    6531,
                    6420,
                    6190,
                    6310,
                    6323,
                    6270,
                    6394,
                    6544,
                    6504,
                    6499,
                    6510,
                    6250,
                    6336,
                    6707,
                    6799,
                    6702,
                    6718,
                    6447,
                    6409,
                    6520,
                    6517,
                    6575,
                    6640,
                    6612,
                    6441,
                    6591,
                    6573,
                    6596,
                    6601,
                    6611,
                    6665,
                    6639,
                    6320,
                    6285,
                    6317,
                    6340,
                    6358,
                    6730,
                    6755,
                    6737,
                    6624,
                    6519,
                    6618,
                    6597,
                    6590,
                    6564,
                    6541,
                    6539,
                    6544,
                    6502,
                    6486,
                    6354]
            },

            {
                name:'持仓数量',
                type:'line',
                yAxisIndex: 1,
                data:[3282523,
                    3296108,
                    3291580,
                    3303412,
                    3304967,
                    3308843,
                    3308628,
                    3314794,
                    3314924,
                    3317699,
                    3315617,
                    3315807,
                    3316341,
                    3321660,
                    3322285,
                    3325807,
                    3313280,
                    3308666,
                    3311260,
                    3308090,
                    3308556,
                    3276023,
                    3289397,
                    3289397,
                    3292761,
                    3293032,
                    3281971,
                    3293254,
                    3293573,
                    3297261,
                    3299668,
                    3301364,
                    3304673,
                    3311024,
                    3308579,
                    3299111,
                    3309915,
                    3309915,
                    3307973,
                    3300311,
                    3300311,
                    3277220,
                    3276824,
                    3287516,
                    3280875,
                    3291778,
                    3303182,
                    3302060,
                    3301273,
                    3301350,
                    3300665,
                    3307722,
                    3311593,
                    3304624,
                    3304945,
                    3305727,
                    3307071,
                    3312140,
                    3297779,
                    3300531,
                    3301967,
                    3303735,
                    3302069,
                    3303778,
                    3309510,
                    3307571,
                    3305759,
                    3307843,
                    3305273,
                    3305981,
                    3312428,
                    3332367,
                    3332094,
                    3336616,
                    3339294,
                    3340850,
                    3347215,
                    3353996,
                    3360152,
                    3369336,
                    3373144,
                    3372941,
                    3373638,
                    3358598,
                    3352805,
                    3342973,
                    3340925,
                    3333083,
                    3334636,
                    3335012,
                    3334766,
                    3336450,
                    3334992,
                    3338623,
                    3338717,
                    3339956,
                    3339792,
                    3341490,
                    3336910,
                    3338914,
                    3336391,
                    3335941,
                    3335117,
                    3332256,
                    3329456,
                    3332256,
                    3322403,
                    3321912,
                    3320209,
                    3319626,
                    3320691,
                    3319157,
                    3323057,
                    3318835,
                    3312096,
                    3311815,
                    3309204,
                    3312659,
                    3308751,
                    3307660,
                    3304620,
                    3294016,
                    3285675,
                    3285683,
                    3285590,
                    3287771,
                    3289899,
                    3290688,
                    3288479,
                    3288468,
                    3288577,
                    3286211]
            },
        ]
    };
    myChart.setOption(options);
</script>
</html>